'use strict';

module.exports = app => {
  const mongoose = app.mongoose;
  const Schema = mongoose.Schema;

  const ReplySchema = new Schema({
    phone: { type: String },
    linkman:{type:String},
    
    conten: { type: String },//内容
    company: {type: String, default: ''},
    
    isShow: { type: Boolean, default: false }, // 管理员是否已读
    

    create_at: { type: Date, default: Date.now },//创建时间
    update_at: { type: Date, default: Date.now },//更新时间
  
  });

  ReplySchema.index({ create_at: -1 });

  return mongoose.model('Reply', ReplySchema);
};
